package com.gxa.email.controller;

import com.gxa.email.dto.MailDTO;
import com.gxa.email.service.EmailService;
import dto.ResultDTO;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
@RestController
@RequestMapping("/email")
public class EmailController {

    @Resource
    private EmailService emailService;

    @PostMapping("/send")
    public void sendEmail(MailDTO mailDTO){
        emailService.sendEmail(mailDTO);
    }
}
